package com.telecom;

import com.telecom.aop.TeacherService;
import com.telecom.aop.UserService;
import com.telecom.config.SpringConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext context=new AnnotationConfigApplicationContext(SpringConfig.class);
        UserService userService = context.getBean(UserService.class);
        userService.save();
        userService.update();

        TeacherService teacherService=context.getBean(TeacherService.class);
        teacherService.teach();
    }
}
